package club.ruanx.search.service;

import club.ruanx.bean.PageBean;
import club.ruanx.solr.entity.SolrMovie;
import club.ruanx.solr.param.SolrMovieParam;
import org.apache.solr.client.solrj.SolrServerException;
import org.springframework.data.domain.Page;

import java.io.IOException;
import java.util.Set;

/**
 * @author 阮胜
 * @date 2018/11/23 14:34
 */
public interface SolrMovieService {

    Page<SolrMovie> findByNameLike(String name, PageBean pageBean);

    Page<SolrMovie> searchMovieWithDistance(String keywords, int distance, PageBean pageBean);

    void syncMovie(String... movieIds);

    Page<SolrMovie> searchMovie(String keywords, PageBean pageBean);

    void save(SolrMovieParam solrMovieParam);

    Set<String> analyzeField(String field) throws IOException, SolrServerException;

    Page<SolrMovie> searchMovieWithNullDistance(String keywords, PageBean pageBean);

    boolean delete(String movieId);
}
